//package com.demo.handler;
//
//import com.alibaba.excel.metadata.CellData;
//import com.alibaba.excel.metadata.Head;
//import com.alibaba.excel.util.StyleUtil;
//import com.alibaba.excel.write.handler.CellWriteHandler;
//import com.alibaba.excel.write.metadata.holder.WriteSheetHolder;
//import com.alibaba.excel.write.metadata.holder.WriteTableHolder;
//import com.alibaba.excel.write.metadata.style.WriteCellStyle;
//import com.alibaba.excel.write.metadata.style.WriteFont;
//import org.apache.poi.ss.usermodel.Cell;
//import org.apache.poi.ss.usermodel.CellStyle;
//import org.apache.poi.ss.usermodel.IndexedColors;
//import org.apache.poi.ss.usermodel.Row;
//import org.apache.poi.ss.usermodel.Workbook;
//
//import java.util.List;
//
///**
// * @author wangfengchen
// */
//public class ContentHandler implements CellWriteHandler {
//  @Override
//  public void beforeCellCreate(WriteSheetHolder writeSheetHolder,
//      WriteTableHolder writeTableHolder, Row row, Head head, Integer integer,
//      Integer integer1, Boolean aBoolean) {
//
//  }
//
//  @Override
//  public void afterCellCreate(WriteSheetHolder writeSheetHolder,
//      WriteTableHolder writeTableHolder, Cell cell, Head head, Integer integer,
//      Boolean aBoolean) {
//
//  }
//
//  @Override
//  public void afterCellDataConverted(WriteSheetHolder writeSheetHolder,
//      WriteTableHolder writeTableHolder, CellData cellData, Cell cell,
//      Head head, Integer integer, Boolean aBoolean) {
//
//  }
//
//  @Override
//  public void afterCellDispose(WriteSheetHolder writeSheetHolder,
//      WriteTableHolder writeTableHolder, List<CellData> cellDataList, Cell cell,
//      Head head, Integer relativeRowIndex, Boolean isHead) {
//    if (!isHead) {
//      Workbook workbook = writeSheetHolder.getSheet().getWorkbook();
//      // 设置标题字体样式
//      WriteCellStyle contentWriteCellStyle = new WriteCellStyle();
//      WriteFont contentWriteFont = new WriteFont();
//      contentWriteFont.setFontName("宋体");
////      contentWriteFont.setFontHeightInPoints((short) 5);
//      contentWriteFont.setBold(true);
//      contentWriteFont.setColor(IndexedColors.YELLOW.getIndex());
//      contentWriteCellStyle.setWriteFont(contentWriteFont);
//      // 设置背景颜色
//      contentWriteCellStyle.setFillForegroundColor(
//          IndexedColors.SKY_BLUE.getIndex());
//      CellStyle cellStyle = StyleUtil.buildHeadCellStyle(workbook,
//          contentWriteCellStyle);
//      cell.setCellStyle(cellStyle);
//
//    }
//  }
//}
